package fun.codedesign.yinxue.code.engine.antlr.java;

import org.antlr.v4.runtime.ParserRuleContext;

public class JavaParserLisnter extends Java20ParserBaseListener {

    @Override
    public void enterMethodDeclaration(Java20Parser.MethodDeclarationContext ctx) {
        accept(ctx);
    }

    @Override
    public void enterCompilationUnit(Java20Parser.CompilationUnitContext ctx) {
        accept(ctx);
    }

    @Override
    public void enterConstructorDeclaration(Java20Parser.ConstructorDeclarationContext ctx) {
        accept(ctx);
    }

    void accept(ParserRuleContext ctx) {
        System.out.println(ctx.toString());
    }
}
